package com.curry.apiprovider.service;

import java.util.List;
import java.util.Set;

public interface RedisCacheDao {

	<T> void save(final String key, final T obj);

	/**
     * @param expires 单位秒
	 */
	<T> void save(final String key, final T obj, Long expires);

	<T> void pushSetItem(final String key, final T obj);

	/**
	 *
	 * @param expires 单位秒
	 */
	<T> void pushSetItem(final String key, final T obj, Long expires);

	<T> void removeSetItem(final String key, final T obj);

	<T> T read(String key, Class<T> type);
	<T> void delete(String key, Class<T> type);
	<T> Set<T> readSet(String key, Class<T> type);
	<T> void pushLisItem(String key, T obj);
	<T> void pushListItem(String key, T obj, Long expires);
	<T> void removeListItem(String key, T obj);
	<T> List<T> readList(String key, Class<T> type);

	<T> Long incr(final String key, final Class<T> type);

	<T> Long incrBy(final String key, final Long integer, final Class<T> type);
}
